var userDao = require('../dao/userDao');

/* GET home page. */

module.exports = function(app){
  app.get('/', function(req, res, next) {
    res.redirect('/');
  });
  app.post('/login',function(req,res,next){
    userDao.login(req,res,next);
  });
  app.post('/addUser',function(req,res){
    userDao.add(req,res);
  });
  app.post('/userList',function(req,res){
    userDao.queryUser(req,res);
  });
  app.post('/deleteUser', function(req,res) {
    userDao.deleteUser(req,res);
  });
};
